import rolesOpt from '@/biz/option/roles.js'
let _this = null

function rolesInfo(info) {
  return rolesOpt.create({
    key: 'roleIds',
    multiple: true,
    title: '人员角色',
    type: 'array'
  }, '1')
}

function options(vm) {
  _this = vm
  let arr = [
  {
    title: '已选人员',
    key: 'ruleName',
    text: {
      whiteSpace: 'normal'
    },
    data: {
      from: (info) => {
        return info.selectionName.join(",")
      }
    }
  }, rolesInfo(_this.info)]
  return arr
}
export default {
  options
}